<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <title>plants</title>
    <style>
     #box{
		width:1000px;
		height:600px;
		position:absolute;
		margin:0 auto;
		left:0;
		right:0;
		top:10px;
	}
    </style>
</head>

<body>
	   <div id='box'></div>
	   <audio id="bgMusic" src="./mp3/bg.MP3" loop></audio>
	   <audio id="eatMusic" src="./mp3/eat.ogg"></audio>
	   <audio id="winMusic" src="./mp3/win.mp3"></audio>
	   <audio id="lostMusic" src="./mp3/lost.mp3"></audio>
	   <audio id="deadMusic" src="./mp3/dead.wav"></audio>
	   <audio id="hitMusic" src="./mp3/hit.ogg"></audio>
	   <audio id="plantMusic" src="./mp3/plant.ogg"></audio>
	   <audio id="shootMusic" src="./mp3/shoot.ogg"></audio>
	   <audio id="pointsMusic" src="./mp3/points.ogg"></audio>
	   <audio id="moneyfallsMusic" src="./mp3/moneyfalls.ogg"></audio>
	   
</body>
	<script type="text/javascript" src='util.js'></script>
	<script type="text/javascript" src='plants.js'></script>
    <script type="text/javascript">
    var bgMusic = document.getElementById('bgMusic');
    var eatMusic = document.getElementById('eatMusic');
    var winMusic = document.getElementById('winMusic');
    var lostMusic = document.getElementById('lostMusic');
    var deadMusic = document.getElementById('deadMusic'); 
    var hitMusic = document.getElementById('hitMusic'); 
    var plantMusic = document.getElementById('plantMusic');      
    var shootMusic = document.getElementById('shootMusic'); 
    var pointsMusic = document.getElementById('pointsMusic'); 
    var moneyfallsMusic = document.getElementById('moneyfallsMusic');     
 	var box = document.getElementById('box');
	plants.init(box,{
					bgMusic:bgMusic,
					winMusic:winMusic,
					lostMusic:lostMusic,
					eatMusic:eatMusic,
					deadMusic:deadMusic,
					hitMusic:hitMusic,
					plantMusic:plantMusic,
					shootMusic:shootMusic,
					pointsMusic:pointsMusic,
					moneyfallsMusic:moneyfallsMusic
				});
	
    </script>
</html>
